{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true,
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "## 安装包部分：\n",
    "\n",
    "本来`geopandas`安装已经非常麻烦了，但是后面画图，要是用`cartopy`，这两个包还安装冲突。\n",
    "因此如果你在安装`cartopy`后，发现`geopandas`的一些函数有问题，建议这么做：\n",
    "1. 使用conda安装`cartopy`: `conda install cartopy`;\n",
    "2. 再使用pip安装`geopandas`: `pip install geopandas`.\n",
    "\n",
    "## 数据部分：\n",
    "\n",
    "数据都是网上公开的，我整理了一下；数据免费分享，直接关注【微信公众号：pypi】，然后回复【气象数据】即可获得需要的数据。\n",
    "当然也可以使用自己的数据，我这里只是教程需要。\n",
    "\n",
    "<img src=\"https://raw.githubusercontent.com/yuanzhoulvpi2017/tiny_python/main/Images/pypi.jpg\" alt=\"微信公众号：pypi\" style=\"height: 100px; width:100px;\"/>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "outputs": [],
   "source": [
    "# 基础的数据处理工具\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "\n",
    "# 可视化\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "# 处理python时间函数\n",
    "import datetime\n",
    "\n",
    "# 处理nc数据\n",
    "import netCDF4 as nc\n",
    "from netCDF4 import num2date\n",
    "\n",
    "\n",
    "# 处理网格数据，shp之类的\n",
    "import geopandas as gpd\n",
    "\n",
    "# 处理tiff文件\n",
    "import rasterio\n",
    "\n",
    "# gis的一些逻辑判断\n",
    "from shapely.geometry import Point\n",
    "\n",
    "# 设置投影坐标系等\n",
    "from cartopy import crs as ccrs\n",
    "\n",
    "# 打印进度条\n",
    "from tqdm import tqdm\n",
    "tqdm.pandas()\n",
    "\n",
    "\n",
    "# 检测系统\n",
    "\n",
    "import platform\n",
    "\n",
    "\n",
    "# matplotlib 显示中文的问题\n",
    "if platform.system() == 'Darwin':\n",
    "    plt.rcParams[\"font.family\"] = 'Arial Unicode MS'\n",
    "elif platform.system() == 'Windows':\n",
    "    plt.rcParams[\"font.family\"] = 'SimHei'\n",
    "else:\n",
    "    pass"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}